package array

type Queue interface {
	GetSize()int
	IsEmpty()bool
	Enqueue(v interface{})
	Dequeue()interface{}
	GetFront()interface{}
}

type FlArrayQueue struct {
	fl *FlArray
}

func NewFlQueue(options ...FunctionOption) Queue {
	return &FlArrayQueue{
		fl: New(options...),
	}
}

func (f *FlArrayQueue)GetSize()int{
	return f.fl.Size()
}
func (f *FlArrayQueue)IsEmpty()bool{
	return f.fl.IsEmpty()
}
func (f *FlArrayQueue) Enqueue(v interface{}){
	f.fl.AddLast(v)
}
func (f *FlArrayQueue)Dequeue()interface{}{
	return f.fl.DeleteFirst()
}
func (f *FlArrayQueue)GetFront()interface{}{
	return f.fl.FindFirst()
}